﻿using PaperMaster.Info;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace PaperMaster.Chess.Enemy
{
    /// <summary>
    /// 敌人种类
    /// </summary>
    public enum EnemyType
    {
        /// <summary>
        /// 占位符,无实际含义
        /// </summary>
        None,
        /// <summary>
        /// 测试敌人
        /// </summary>
        Test,
        /// <summary>
        /// 网络对战敌人
        /// </summary>
        Internet
    }
    /// <summary>
    /// 敌人的各类数据
    /// </summary>
    public interface IEnemyModel : Model.IModel
    {
        /// <summary>
        /// 当前敌人
        /// </summary>
        EnemyController currentEnemy { get; set; }
    }
    /// <summary>
    /// 敌人数据
    /// </summary>
    public class EnemyModel : IEnemyModel
    {
        EnemyController _currentEnemy;
        public EnemyController currentEnemy
        {
            get
            {
                if (_currentEnemy == null)
                {
                    _currentEnemy = EnemyViewController.GetController();
                }
                return _currentEnemy;
            }
            set
            {
                _currentEnemy = value;
            }
        }
    }

    /// <summary>
    /// 一波敌袭中，需要的敌人数据
    /// </summary>
    public class SingleEnemyModel
    {
        int _hp = 20;
        /// <summary>
        /// 老巢血量
        /// </summary>
        public int hp
        {
            get
            {
                return _hp;
            }
            set
            {
                _hp = value;
                AbstractFightInfoViewController.GetController().UpdateUI("OpponentHp");
            }
        }
    }
}
